Remove prefix on category title

109

function prefix_category_title( $title ) {
 if ( is_category() ) {
  $title = single_cat_title( '', false );
 }
return $title;
}

add_filter( 'get_the_archive_title', 'prefix_category_title' );
if ( is_category() ) {
        $title = sprintf( __( 'Category: %s' ), single_cat_title( '', false ) );
    } elseif ( is_tag() ) {
        $title = sprintf( __( 'Tag: %s' ), single_tag_title( '', false ) );
    } elseif ( is_author() ) {
        $title = sprintf( __( 'Autor: %s' ), '<span class="vcard">' . get_the_author() . '</span>' );
    }

//directory: wp-includes
//file: general-template.php
//find function: get_the_archive_title() change:

Comments

Submit
0 Comments